package com.kaoshi.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.kaoshi.utils.TimeUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;
import java.util.Date;

@Data //生成SetGet方法
@AllArgsConstructor //生成有参构造方法
@NoArgsConstructor //生成无参构造方法
public class News {//添加注释
    private int newsid;
    private String newstitle;
    private String newscontent;
    private String newsauthor;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") //时间格式转换
    private Timestamp createtime = TimeUtil.getDate(new Date());//TimeUtil工具类编写参考5.3，TimeUtil为自己写的时间格式转换类
    private int isdeleted;
}

